package com.mayuanfei.springproxy.staticproxy;

import com.mayuanfei.springproxy.Persion;

/**
 * 静态代理
 *
 * @author 老马
 * @date 2023-02-28 10:06
 */
public class PersionProxy implements Persion {
    private Persion persion;
    public PersionProxy(Persion persion){
        this.persion = persion;
    }

    /**
     * 吃的方法
     */
    @Override
    public void eat() {
        System.out.println("吃饭前洗手");
        this.persion.eat();
        System.out.println("吃饭后洗碗");
    }
}